package com.kuang.service;

import com.kuang.dao.UsageMapper;
import com.kuang.pojo.Location;
import com.kuang.pojo.Usage;

import java.util.List;

public class UsageServiceImpl implements UsageService {
    //service调dao层，组合Dao
    private UsageMapper usageMapper;

    public void setUsageMapper(UsageMapper usageMapper) {
        this.usageMapper = usageMapper;
    }

    public String beginLocation(int usage_id) {
        return usageMapper.beginLocation(usage_id);
    }

    public String arrivalLocation(int usage_id) {
        return usageMapper.arrivalLocation(usage_id);
    }

    public List<Usage> selectAll() {
        return usageMapper.selectAll();
    }

    public List<Location> selectAllBegin_location() {
        return usageMapper.selectAllBegin_location();
    }

    public List<Integer> selectUsage_idByUsername(String username) {
        return usageMapper.selectUsage_idByUsername(username);
    }

    public int selectStateByUsage_id(int usage_id) {
        return usageMapper.selectStateByUsage_id(usage_id);
    }
}
